<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-form ref="form" :model="form">
        <el-descriptions  title="监管任务信息"  :column="3" border >
          <el-descriptions-item label="流水号"    label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.sequenceNumber}}</el-descriptions-item>
          <el-descriptions-item label="JS代表室"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_representative_office" :value="form.representativeOffice" />
          </el-descriptions-item>
          <el-descriptions-item label="合同编号"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.contractNo }}</el-descriptions-item>
          <el-descriptions-item label="M级"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_security_grade" :value="form.security" />
          </el-descriptions-item>
          <el-descriptions-item label="合同类别"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_contract_type" :value="form.contractType" />
          </el-descriptions-item>
          <el-descriptions-item label="项目类别" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_item_classification" :value="form.itemClassification" />
          </el-descriptions-item>
        </el-descriptions>
        <br/>
        <el-descriptions  title="风险告知单信息"  :column="3" border >
          <el-descriptions-item label="告知单编号"   label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.adviseNo }}</el-descriptions-item>
          <el-descriptions-item label="合同名称"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.contractName }}</el-descriptions-item>
          <el-descriptions-item label="合同总金额"  :contentStyle='contentStyle' label-class-name="my-label" :labelStyle="labelStyle" >{{ form.totalAmount }}</el-descriptions-item>
          <el-descriptions-item label="日期"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.riskDate }}</el-descriptions-item>
          <el-descriptions-item label="联系人"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.linkman }}</el-descriptions-item>
          <el-descriptions-item label="联系方式"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.contactInformation }}</el-descriptions-item>
          <el-descriptions-item label="产品层级"  :contentStyle='contentStyle' label-class-name="my-label" :labelStyle="labelStyle" >{{ form.productHierarchy }}</el-descriptions-item>
          <el-descriptions-item label="合同甲方"  :contentStyle='contentStyle' label-class-name="my-label" :labelStyle="labelStyle" >{{ form.partyA }}</el-descriptions-item>
          <el-descriptions-item label="合同乙方"  :contentStyle='contentStyle' label-class-name="my-label" :labelStyle="labelStyle" >{{ form.partyB }}</el-descriptions-item>
          <el-descriptions-item label="拟制人"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.fictitiousPerson }}</el-descriptions-item>
          <el-descriptions-item label="风险通知单类型"  :span="2" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.riskNoticeType }}</el-descriptions-item>
          <el-descriptions-item label="风险管理工作"  :span="3" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.undertakeRiskManagement }}</el-descriptions-item>
          <el-descriptions-item label="JDS意见"   :span="3" label-class-name="my-label":contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.representativeOfficeOpinion }}</el-descriptions-item>
        </el-descriptions>
        <br/>
        <el-descriptions  title="总体风险评估信息"  :column="3" border >
          <el-descriptions-item label="质量"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.assessmentQuality }}</el-descriptions-item>
          <el-descriptions-item label="进度" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.assessmentSchedule }}</el-descriptions-item>
          <el-descriptions-item label="费用"  label-class-name="my-label":contentStyle='contentStyle'  :labelStyle="labelStyle" >{{ form.assessmentCost }}</el-descriptions-item>
          <el-descriptions-item label="售后服务"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.assessmentService }}</el-descriptions-item>
          <el-descriptions-item label="备注"  label-class-name="my-label" :labelStyle="labelStyle" >{{ form.remark }}</el-descriptions-item>
        </el-descriptions>
      </el-form>
      <br/>
      <div style="float:right; margin-bottom: 15px;">
        <el-button @click="viewCancel">返 回</el-button>
      </div>
    </el-card>
  </div>
</template>

<script>
import { listNotification, getNotification, delNotification, addNotification, updateNotification } from "@/api/module/cjl/inform";
import { getToken } from "@/utils/auth";
import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import watermark from "watermark-dom";
export default {
  name: "Notification",
  dicts: ['yh_security_grade', 'yh_representative_office', 'yh_contract_type', 'yh_item_classification'],
  components: {Treeselect},
  data() {
    return {
      contentStyle: {
        'width': '400px',
      },
      labelStyle: { 'width': '200px','color': '#000000','text-align': 'right', },
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: false,
      // 总条数
      total: 0,
      // 部门树选项
      deptOptions: undefined,
      // 风险告知单表格数据
      notificationList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        adviseNo: null,
        sequenceNumber: null,
        contractName: null,
        contractNo: null,
        security: null,
        riskDate: null,
        linkman: null,
        contactInformation: null,
        representativeOffice: null,
        contractType: null,
        itemClassification: null,
        totalAmount: null,
        productHierarchy: null,
        partyA: null,
        partyB: null,
        undertakeRiskManagement: null,
        assessmentQuality: null,
        assessmentSchedule: null,
        assessmentCost: null,
        assessmentService: null,
        representativeOfficeOpinion: null,
        fictitiousPerson: null,
        riskNoticeType: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null,
        note6: null,
        note7: null,
        note8: null,
        note9: null,
        note10: null
      },
      // 表单参数
      form: {},

    };
  },
  mounted() {
    watermark.load({watermark_txt: "  "});
  },
  created() {
    const id = this.$route.query.id;
    if (id) {
      // 获取表详细信息
      getNotification(id).then(res => {
        this.form = res.data;

      });

    }
  },
  methods: {
    /** 关闭按钮 */
    viewCancel() {
      const id = this.$route.query.id;
      getNotification(id).then(response => {
        this.form = response.data;

      });
      const obj = {path: "/hetong/cjlinform", query: {id}};
      this.$tab.closeOpenPage(obj);
  },
  /** 查询部门下拉树结构 */
  getTreeselect() {
    treeselect().then(response => {
      this.deptOptions = response.data;
    });
  },
 }
};
</script>
<style lang="scss" scoped>

</style>
